<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_09) on Sat Dec 29 12:31:14 CET 2012 -->
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>Graph (gephi 0.8.2 API)</title>
<meta name="date" content="2012-12-29">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="Graph (gephi 0.8.2 API)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Graph.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/gephi/graph/api/EdgeIterator.html" title="interface in org.gephi.graph.api"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/gephi/graph/api/GraphController.html" title="interface in org.gephi.graph.api"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/gephi/graph/api/Graph.html" target="_top">Frames</a></li>
<li><a href="Graph.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.gephi.graph.api</div>
<h2 title="Interface Graph" class="title">Interface Graph</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd><a href="../../../../org/gephi/graph/api/Attributable.html" title="interface in org.gephi.graph.api">Attributable</a></dd>
</dl>
<dl>
<dt>All Known Subinterfaces:</dt>
<dd><a href="../../../../org/gephi/graph/api/DirectedGraph.html" title="interface in org.gephi.graph.api">DirectedGraph</a>, <a href="../../../../org/gephi/graph/api/HierarchicalDirectedGraph.html" title="interface in org.gephi.graph.api">HierarchicalDirectedGraph</a>, <a href="../../../../org/gephi/graph/api/HierarchicalGraph.html" title="interface in org.gephi.graph.api">HierarchicalGraph</a>, <a href="../../../../org/gephi/graph/api/HierarchicalMixedGraph.html" title="interface in org.gephi.graph.api">HierarchicalMixedGraph</a>, <a href="../../../../org/gephi/graph/api/HierarchicalUndirectedGraph.html" title="interface in org.gephi.graph.api">HierarchicalUndirectedGraph</a>, <a href="../../../../org/gephi/graph/api/MixedGraph.html" title="interface in org.gephi.graph.api">MixedGraph</a>, <a href="../../../../org/gephi/graph/api/UndirectedGraph.html" title="interface in org.gephi.graph.api">UndirectedGraph</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="strong">Graph</span>
extends <a href="../../../../org/gephi/graph/api/Attributable.html" title="interface in org.gephi.graph.api">Attributable</a></pre>
<div class="block">Main interface for accessing the graph structure and develop algorithms.
 <p>
 A graph object belongs to a graph model, which really contains the data. Graph
 objects are therefore only accessors, with all convinient methods to read and
 modify the structure. Hence, <b>multiple</b> <code>Graph</code> objects can
 exists.
 <h3>Get current graph</h3>
 <pre>
 GraphController graphController = Lookup.getDefault().lookup(GraphController.class);
 GraphModel model = graphController.getModel();
 Graph graph = model.getGraph();
 </pre>
 <b>Note:</b> This shows how to get the complete graph, for getting only the
 currently visualized graph, call <code>model.getGraphVisible()</code> instead.
 <h3>Graph Locking</h3>
 Graph structure possess a locking mechanism that avoids multiple threads
 to modify the structure concurrently. However, several readers are allowed.
 <p>
 There is two different way to perform read locking:
 <ul><li>Manually by calling <code>readLock()</code> and <code>readUnlock()</code></li>
 <li>Structure is automatically locked when you read the various <code>NodeIterable</code>
 and <code>EdgeIterable</code></li></ul>
 Be always sure you don't leave the structure blocked. use <code>readUnlockAll()</code>
 to release all the locks.
 <p>
 <b>Note:</b> Write locking is automatically done when modifying th graph
 (add, remove, ...).</div>
<dl><dt><span class="strong">Author:</span></dt>
  <dd>Mathieu Bastian</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#addEdge(org.gephi.graph.api.Edge)">addEdge</a></strong>(<a href="../../../../org/gephi/graph/api/Edge.html" title="interface in org.gephi.graph.api">Edge</a>&nbsp;edge)</code>
<div class="block">Add <code>edge</code> to the graph.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#addNode(org.gephi.graph.api.Node)">addNode</a></strong>(<a href="../../../../org/gephi/graph/api/Node.html" title="interface in org.gephi.graph.api">Node</a>&nbsp;node)</code>
<div class="block">Add a node to the graph.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#clear()">clear</a></strong>()</code>
<div class="block">Removes all nodes and edges in the graph.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#clearEdges()">clearEdges</a></strong>()</code>
<div class="block">Removes all edges in the graph.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#clearEdges(org.gephi.graph.api.Node)">clearEdges</a></strong>(<a href="../../../../org/gephi/graph/api/Node.html" title="interface in org.gephi.graph.api">Node</a>&nbsp;node)</code>
<div class="block">Removes all edges incident to <code>node</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#contains(org.gephi.graph.api.Edge)">contains</a></strong>(<a href="../../../../org/gephi/graph/api/Edge.html" title="interface in org.gephi.graph.api">Edge</a>&nbsp;edge)</code>
<div class="block">Returns true if the graph contains <code>edge</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#contains(org.gephi.graph.api.Node)">contains</a></strong>(<a href="../../../../org/gephi/graph/api/Node.html" title="interface in org.gephi.graph.api">Node</a>&nbsp;node)</code>
<div class="block">Returns true if the graph contains <code>node</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#getDegree(org.gephi.graph.api.Node)">getDegree</a></strong>(<a href="../../../../org/gephi/graph/api/Node.html" title="interface in org.gephi.graph.api">Node</a>&nbsp;node)</code>
<div class="block">Returns the degree of <code>node</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/gephi/graph/api/Edge.html" title="interface in org.gephi.graph.api">Edge</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#getEdge(int)">getEdge</a></strong>(int&nbsp;id)</code>
<div class="block">Returns the edge with identifier equals to <code>id</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/gephi/graph/api/Edge.html" title="interface in org.gephi.graph.api">Edge</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#getEdge(org.gephi.graph.api.Node, org.gephi.graph.api.Node)">getEdge</a></strong>(<a href="../../../../org/gephi/graph/api/Node.html" title="interface in org.gephi.graph.api">Node</a>&nbsp;node1,
       <a href="../../../../org/gephi/graph/api/Node.html" title="interface in org.gephi.graph.api">Node</a>&nbsp;node2)</code>
<div class="block">Finds and returns a <b>directed</b> or <b>undirected</b> edge that connects <code>node1</code> and
 <code>node2</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/gephi/graph/api/Edge.html" title="interface in org.gephi.graph.api">Edge</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#getEdge(java.lang.String)">getEdge</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;id)</code>
<div class="block">Returns the edge with identifier equals to <code>id</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#getEdgeCount()">getEdgeCount</a></strong>()</code>
<div class="block">Returns the number of edges in the graph</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/gephi/graph/api/EdgeIterable.html" title="interface in org.gephi.graph.api">EdgeIterable</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#getEdges()">getEdges</a></strong>()</code>
<div class="block">Returns edges contained in the graph.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/gephi/graph/api/EdgeIterable.html" title="interface in org.gephi.graph.api">EdgeIterable</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#getEdges(org.gephi.graph.api.Node)">getEdges</a></strong>(<a href="../../../../org/gephi/graph/api/Node.html" title="interface in org.gephi.graph.api">Node</a>&nbsp;node)</code>
<div class="block">Returns edges incident to <code>node</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#getEdgeVersion()">getEdgeVersion</a></strong>()</code>
<div class="block">Return the current edge version of the graph.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/gephi/graph/api/GraphModel.html" title="interface in org.gephi.graph.api">GraphModel</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#getGraphModel()">getGraphModel</a></strong>()</code>
<div class="block">Returns the graph model this graph belongs to.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/gephi/graph/api/NodeIterable.html" title="interface in org.gephi.graph.api">NodeIterable</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#getNeighbors(org.gephi.graph.api.Node)">getNeighbors</a></strong>(<a href="../../../../org/gephi/graph/api/Node.html" title="interface in org.gephi.graph.api">Node</a>&nbsp;node)</code>
<div class="block">Returns neighbors of <code>node</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/gephi/graph/api/Node.html" title="interface in org.gephi.graph.api">Node</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#getNode(int)">getNode</a></strong>(int&nbsp;id)</code>
<div class="block">Returns the node with identifier equals to <code>id</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/gephi/graph/api/Node.html" title="interface in org.gephi.graph.api">Node</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#getNode(java.lang.String)">getNode</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;id)</code>
<div class="block">Returns the node with identifier equals to <code>id</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#getNodeCount()">getNodeCount</a></strong>()</code>
<div class="block">Returns the number of nodes in the graph.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/gephi/graph/api/NodeIterable.html" title="interface in org.gephi.graph.api">NodeIterable</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#getNodes()">getNodes</a></strong>()</code>
<div class="block">Returns nodes contained in the graph.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#getNodeVersion()">getNodeVersion</a></strong>()</code>
<div class="block">Return the current node version of the graph.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/gephi/graph/api/Node.html" title="interface in org.gephi.graph.api">Node</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#getOpposite(org.gephi.graph.api.Node, org.gephi.graph.api.Edge)">getOpposite</a></strong>(<a href="../../../../org/gephi/graph/api/Node.html" title="interface in org.gephi.graph.api">Node</a>&nbsp;node,
           <a href="../../../../org/gephi/graph/api/Edge.html" title="interface in org.gephi.graph.api">Edge</a>&nbsp;edge)</code>
<div class="block">Returns the adjacent node of <code>node</code> through <code>edge</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/gephi/graph/api/GraphView.html" title="interface in org.gephi.graph.api">GraphView</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#getView()">getView</a></strong>()</code>
<div class="block">Returns the graph view this graph belongs to.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#isAdjacent(org.gephi.graph.api.Edge, org.gephi.graph.api.Edge)">isAdjacent</a></strong>(<a href="../../../../org/gephi/graph/api/Edge.html" title="interface in org.gephi.graph.api">Edge</a>&nbsp;edge1,
          <a href="../../../../org/gephi/graph/api/Edge.html" title="interface in org.gephi.graph.api">Edge</a>&nbsp;edge2)</code>
<div class="block">Returns <code>true</code> if <code>edge1</code> is adjacent to <code>edge2</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#isAdjacent(org.gephi.graph.api.Node, org.gephi.graph.api.Node)">isAdjacent</a></strong>(<a href="../../../../org/gephi/graph/api/Node.html" title="interface in org.gephi.graph.api">Node</a>&nbsp;node1,
          <a href="../../../../org/gephi/graph/api/Node.html" title="interface in org.gephi.graph.api">Node</a>&nbsp;node2)</code>
<div class="block">Returns <code>true</code> if <code>node1</code> is adjacent to <code>node2</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#isDirected(org.gephi.graph.api.Edge)">isDirected</a></strong>(<a href="../../../../org/gephi/graph/api/Edge.html" title="interface in org.gephi.graph.api">Edge</a>&nbsp;edge)</code>
<div class="block">Returns <code>true</code> if <code>edge</code> is a directed edge in the current graph.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#isSelfLoop(org.gephi.graph.api.Edge)">isSelfLoop</a></strong>(<a href="../../../../org/gephi/graph/api/Edge.html" title="interface in org.gephi.graph.api">Edge</a>&nbsp;edge)</code>
<div class="block">Returns <code>true</code> if <code>edge</code> is a self-loop.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#readLock()">readLock</a></strong>()</code>
<div class="block">Acquires a read lock on the graph.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#readUnlock()">readUnlock</a></strong>()</code>
<div class="block">Releases the read lock on the graph.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#readUnlockAll()">readUnlockAll</a></strong>()</code>
<div class="block">Safe method that releases all read locks the calling thread has acquired.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#removeEdge(org.gephi.graph.api.Edge)">removeEdge</a></strong>(<a href="../../../../org/gephi/graph/api/Edge.html" title="interface in org.gephi.graph.api">Edge</a>&nbsp;edge)</code>
<div class="block">Remove <code>edge</code> from the graph.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#removeNode(org.gephi.graph.api.Node)">removeNode</a></strong>(<a href="../../../../org/gephi/graph/api/Node.html" title="interface in org.gephi.graph.api">Node</a>&nbsp;node)</code>
<div class="block">Remove <code>node</code> from the graph.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#setId(org.gephi.graph.api.Edge, java.lang.String)">setId</a></strong>(<a href="../../../../org/gephi/graph/api/Edge.html" title="interface in org.gephi.graph.api">Edge</a>&nbsp;edge,
     <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;id)</code>
<div class="block">Sets the string identifier of <code>edge</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#setId(org.gephi.graph.api.Node, java.lang.String)">setId</a></strong>(<a href="../../../../org/gephi/graph/api/Node.html" title="interface in org.gephi.graph.api">Node</a>&nbsp;node,
     <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;id)</code>
<div class="block">Sets the string identifier of <code>node</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#writeLock()">writeLock</a></strong>()</code>
<div class="block">Acquires a write lock on the graph.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/gephi/graph/api/Graph.html#writeUnlock()">writeUnlock</a></strong>()</code>
<div class="block">Release the write lock on the graph.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.gephi.graph.api.Attributable">
<!--   -->
</a>
<h3>Methods inherited from interface&nbsp;org.gephi.graph.api.<a href="../../../../org/gephi/graph/api/Attributable.html" title="interface in org.gephi.graph.api">Attributable</a></h3>
<code><a href="../../../../org/gephi/graph/api/Attributable.html#getAttributes()">getAttributes</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="addEdge(org.gephi.graph.api.Edge)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addEdge</h4>
<pre>boolean&nbsp;addEdge(<a href="../../../../org/gephi/graph/api/Edge.html" title="interface in org.gephi.graph.api">Edge</a>&nbsp;edge)</pre>
<div class="block">Add <code>edge</code> to the graph. Graph does not accept parallel edges.
 Fails if <code>edge</code> is already in the graph.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>edge</code> - the edge to add</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if add is successful, false otherwise</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>edge</code> is <code>null</code>,
 or if nodes are not legal nodes for this <code>edge</code>,
 or if <code>edge</code> is directed when the graph is undirected,
 or if <code>edge</code> is undirected when the graph is directed,</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalMonitorStateException.html?is-external=true" title="class or interface in java.lang">IllegalMonitorStateException</a></code> - if the current thread is holding a read lock</dd></dl>
</li>
</ul>
<a name="addNode(org.gephi.graph.api.Node)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addNode</h4>
<pre>boolean&nbsp;addNode(<a href="../../../../org/gephi/graph/api/Node.html" title="interface in org.gephi.graph.api">Node</a>&nbsp;node)</pre>
<div class="block">Add a node to the graph.
 Fails if the node already exists.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>node</code> - the node to add</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if add is successful, false otherwise</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>node</code> is <code>null</code></dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalMonitorStateException.html?is-external=true" title="class or interface in java.lang">IllegalMonitorStateException</a></code> - if the current thread is holding a read lock</dd></dl>
</li>
</ul>
<a name="removeEdge(org.gephi.graph.api.Edge)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeEdge</h4>
<pre>boolean&nbsp;removeEdge(<a href="../../../../org/gephi/graph/api/Edge.html" title="interface in org.gephi.graph.api">Edge</a>&nbsp;edge)</pre>
<div class="block">Remove <code>edge</code> from the graph.
 Fails if the edge doesn't exist.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>edge</code> - the edge to remove</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if remove is successful, false otherwise</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>edge</code> is <code>null</code> or nodes not legal in
 the graph</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalMonitorStateException.html?is-external=true" title="class or interface in java.lang">IllegalMonitorStateException</a></code> - if the current thread is holding a read lock</dd></dl>
</li>
</ul>
<a name="removeNode(org.gephi.graph.api.Node)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeNode</h4>
<pre>boolean&nbsp;removeNode(<a href="../../../../org/gephi/graph/api/Node.html" title="interface in org.gephi.graph.api">Node</a>&nbsp;node)</pre>
<div class="block">Remove <code>node</code> from the graph. All <code>node</code>'s children and incident edges will
 also be removed.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>node</code> - the node to remove</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if remove is successful, false otherwise</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>node</code> is <code>null</code>
 or not legal in the graph.</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalMonitorStateException.html?is-external=true" title="class or interface in java.lang">IllegalMonitorStateException</a></code> - if the current thread is holding a read lock</dd></dl>
</li>
</ul>
<a name="contains(org.gephi.graph.api.Node)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>contains</h4>
<pre>boolean&nbsp;contains(<a href="../../../../org/gephi/graph/api/Node.html" title="interface in org.gephi.graph.api">Node</a>&nbsp;node)</pre>
<div class="block">Returns true if the graph contains <code>node</code>.
 <p><b>Warning:</b> This method is not thread safe, be sure to call it in a locked
 statement.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>node</code> - the node whose presence is required</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if the graph contains <code>node</code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>node</code> is <code>null</code></dd></dl>
</li>
</ul>
<a name="contains(org.gephi.graph.api.Edge)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>contains</h4>
<pre>boolean&nbsp;contains(<a href="../../../../org/gephi/graph/api/Edge.html" title="interface in org.gephi.graph.api">Edge</a>&nbsp;edge)</pre>
<div class="block">Returns true if the graph contains <code>edge</code>.
 <p><b>Warning:</b> This method is not thread safe, be sure to call it in a locked
 statement.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>edge</code> - the edge whose presence is required</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if the graph contains <code>edge</code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>edge</code> is <code>null</code></dd></dl>
</li>
</ul>
<a name="getNode(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNode</h4>
<pre><a href="../../../../org/gephi/graph/api/Node.html" title="interface in org.gephi.graph.api">Node</a>&nbsp;getNode(int&nbsp;id)</pre>
<div class="block">Returns the node with identifier equals to <code>id</code>. If not found,
 returns <code>null</code>. This id is generated and can be found in
 <code>Node.getId()</code>.
 <p><b>Warning:</b> This method is not thread safe, be sure to call it in a locked
 statement.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>id</code> - a positive number</dd>
<dt><span class="strong">Returns:</span></dt><dd>the node with given <code>id</code>, or <code>null</code> if not found</dd></dl>
</li>
</ul>
<a name="getNode(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNode</h4>
<pre><a href="../../../../org/gephi/graph/api/Node.html" title="interface in org.gephi.graph.api">Node</a>&nbsp;getNode(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;id)</pre>
<div class="block">Returns the node with identifier equals to <code>id</code>. If not found,
 returns <code>null</code>. This id is set by user and can be found at
 <code>NodeData.getId()</code>. To set this Id, use <code>Graph.setId()</code>.
 <p>
 The node must be present in the view this graph is from.
 <p><b>Warning:</b> This method is not thread safe, be sure to call it in a locked
 statement.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>id</code> - the string identifier, unique</dd>
<dt><span class="strong">Returns:</span></dt><dd>the node with given <code>id</code>, or <code>null</code> if not found</dd></dl>
</li>
</ul>
<a name="getEdge(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEdge</h4>
<pre><a href="../../../../org/gephi/graph/api/Edge.html" title="interface in org.gephi.graph.api">Edge</a>&nbsp;getEdge(int&nbsp;id)</pre>
<div class="block">Returns the edge with identifier equals to <code>id</code>. If not found,
 returns <code>null</code>. This id is generated and can be found in
 <code>Edge.getId()</code>.
 <p><b>Warning:</b> This method is not thread safe, be sure to call it in a locked
 statement.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>id</code> - a positive number</dd>
<dt><span class="strong">Returns:</span></dt><dd>the edge with given <code>id</code>, or <code>null</code> if not found</dd></dl>
</li>
</ul>
<a name="getEdge(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEdge</h4>
<pre><a href="../../../../org/gephi/graph/api/Edge.html" title="interface in org.gephi.graph.api">Edge</a>&nbsp;getEdge(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;id)</pre>
<div class="block">Returns the edge with identifier equals to <code>id</code>. If not found,
 returns <code>null</code>.  This id is set by user and can be found at
 <code>EdgeData.getId()</code>. To set this Id, use <code>Graph.setId()</code>.
 <p><b>Warning:</b> This method is not thread safe, be sure to call it in a locked
 statement.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>id</code> - the string identifier, unique</dd>
<dt><span class="strong">Returns:</span></dt><dd>the edge with given <code>id</code>, or <code>null</code> if not found</dd></dl>
</li>
</ul>
<a name="getEdge(org.gephi.graph.api.Node, org.gephi.graph.api.Node)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEdge</h4>
<pre><a href="../../../../org/gephi/graph/api/Edge.html" title="interface in org.gephi.graph.api">Edge</a>&nbsp;getEdge(<a href="../../../../org/gephi/graph/api/Node.html" title="interface in org.gephi.graph.api">Node</a>&nbsp;node1,
           <a href="../../../../org/gephi/graph/api/Node.html" title="interface in org.gephi.graph.api">Node</a>&nbsp;node2)</pre>
<div class="block">Finds and returns a <b>directed</b> or <b>undirected</b> edge that connects <code>node1</code> and
 <code>node2</code>. Returns <code>null</code> if no such edge is found.
 <p><b>Warning:</b> This method is not thread safe, be sure to call it in a locked
 statement.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>node1</code> - the first incident node of the queried edge</dd><dd><code>node2</code> - thge second incident node of the queried edge</dd>
<dt><span class="strong">Returns:</span></dt><dd>an edge that connects <code>node1</code> and <code>node2</code>
 or <code>null</code> if no such edge exists</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>node1</code> or <code>node2</code>
 are <code>null</code> or not legal nodes in the graph</dd></dl>
</li>
</ul>
<a name="getNodes()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNodes</h4>
<pre><a href="../../../../org/gephi/graph/api/NodeIterable.html" title="interface in org.gephi.graph.api">NodeIterable</a>&nbsp;getNodes()</pre>
<div class="block">Returns nodes contained in the graph.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>a node iterable of nodes contained in the graph.</dd></dl>
</li>
</ul>
<a name="getEdges()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEdges</h4>
<pre><a href="../../../../org/gephi/graph/api/EdgeIterable.html" title="interface in org.gephi.graph.api">EdgeIterable</a>&nbsp;getEdges()</pre>
<div class="block">Returns edges contained in the graph. Self-loops will be present only once.
 <p>
 If the graph is <b>undirected</b>, directed mutual edges will be present only once.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>an edge iterable of edges contained in the graph.</dd></dl>
</li>
</ul>
<a name="getNeighbors(org.gephi.graph.api.Node)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNeighbors</h4>
<pre><a href="../../../../org/gephi/graph/api/NodeIterable.html" title="interface in org.gephi.graph.api">NodeIterable</a>&nbsp;getNeighbors(<a href="../../../../org/gephi/graph/api/Node.html" title="interface in org.gephi.graph.api">Node</a>&nbsp;node)</pre>
<div class="block">Returns neighbors of <code>node</code>. Neighbors are nodes connected to
 <code>node</code> with any edge of the graph. Neighbors exclude <code>node</code> itself,
 therefore self-loops are ignored.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>node</code> - the node whose neighbors are to be returned</dd>
<dt><span class="strong">Returns:</span></dt><dd>a node iterable of <code>node</code>'s neighbors</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>node</code> is <code>null</code>
 or not legal in the graph.</dd></dl>
</li>
</ul>
<a name="getEdges(org.gephi.graph.api.Node)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEdges</h4>
<pre><a href="../../../../org/gephi/graph/api/EdgeIterable.html" title="interface in org.gephi.graph.api">EdgeIterable</a>&nbsp;getEdges(<a href="../../../../org/gephi/graph/api/Node.html" title="interface in org.gephi.graph.api">Node</a>&nbsp;node)</pre>
<div class="block">Returns edges incident to <code>node</code>.
 <p>
 For <b>directed</b> graph, note that self-loops are repeated only once. <b>Undirected</b>
 graphs repeats edges once by default.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>node</code> - the node whose incident edges are to be returned</dd>
<dt><span class="strong">Returns:</span></dt><dd>an edge iterable of edges incident to <code>node</code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>node</code> is <code>null</code>
 or not legal in the graph.</dd></dl>
</li>
</ul>
<a name="getNodeCount()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNodeCount</h4>
<pre>int&nbsp;getNodeCount()</pre>
<div class="block">Returns the number of nodes in the graph.
 <p>
 Special case of interest:
 <ul><li>For <b>hierarchical</b> graph, returns the number of nodes in the
 current view only.</li>
 </ul>
 <p><b>Warning:</b> This method is not thread safe, be sure to call it in a locked
 statement.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the number of nodes in the graph</dd></dl>
</li>
</ul>
<a name="getEdgeCount()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEdgeCount</h4>
<pre>int&nbsp;getEdgeCount()</pre>
<div class="block">Returns the number of edges in the graph
 <p>
 Special case of interest:
 <ul><li>Count self-loops once only.</li>
 <li>For <b>hierarchical</b> graph, count edges incident only to nodes
 in the current view.</li></ul>
 <p><b>Warning:</b> This method is not thread safe, be sure to call it in a locked
 statement.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the number of edges in the graph.</dd></dl>
</li>
</ul>
<a name="getNodeVersion()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNodeVersion</h4>
<pre>int&nbsp;getNodeVersion()</pre>
<div class="block">Return the current node version of the graph. When node structure is touched (i.e. add, remove...) the
 node version is <b>incremented</b>.
 <p>External modules can compare local copy of version to determine if update
 is necessary.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the current node version of the graph</dd></dl>
</li>
</ul>
<a name="getEdgeVersion()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEdgeVersion</h4>
<pre>int&nbsp;getEdgeVersion()</pre>
<div class="block">Return the current edge version of the graph. When edge structure is touched (i.e. add, remove...) the
 edge version is <b>incremented</b>.
 <p>External modules can compare local copy of version to determine if update
 is necessary.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the current edge version of the graph</dd></dl>
</li>
</ul>
<a name="getOpposite(org.gephi.graph.api.Node, org.gephi.graph.api.Edge)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getOpposite</h4>
<pre><a href="../../../../org/gephi/graph/api/Node.html" title="interface in org.gephi.graph.api">Node</a>&nbsp;getOpposite(<a href="../../../../org/gephi/graph/api/Node.html" title="interface in org.gephi.graph.api">Node</a>&nbsp;node,
               <a href="../../../../org/gephi/graph/api/Edge.html" title="interface in org.gephi.graph.api">Edge</a>&nbsp;edge)</pre>
<div class="block">Returns the adjacent node of <code>node</code> through <code>edge</code>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>node</code> - the node whose adjacent node is to be returned</dd><dd><code>edge</code> - the edge whose the opposite node is to be returned</dd>
<dt><span class="strong">Returns:</span></dt><dd>the adjacent node of <code>node</code> through <code>edge</code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>node</code> or <code>edge</code> is <code>null</code>,
 or if <code>node</code> is not incident to <code>edge</code></dd></dl>
</li>
</ul>
<a name="getDegree(org.gephi.graph.api.Node)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDegree</h4>
<pre>int&nbsp;getDegree(<a href="../../../../org/gephi/graph/api/Node.html" title="interface in org.gephi.graph.api">Node</a>&nbsp;node)</pre>
<div class="block">Returns the degree of <code>node</code>. Self-loops are counted twice for <b>directed</b> graphs.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>node</code> - the node whose degree is to be returned
 <p><b>Warning:</b> This method is not thread safe, be sure to call it in a locked
 statement.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the degree of <code>node</code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>node</code> is <code>null</code> or not legal in the graph</dd></dl>
</li>
</ul>
<a name="isSelfLoop(org.gephi.graph.api.Edge)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isSelfLoop</h4>
<pre>boolean&nbsp;isSelfLoop(<a href="../../../../org/gephi/graph/api/Edge.html" title="interface in org.gephi.graph.api">Edge</a>&nbsp;edge)</pre>
<div class="block">Returns <code>true</code> if <code>edge</code> is a self-loop.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>edge</code> - the edge to be queried</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>true</code> if <code>edge</code> is a self-loop, <code>false</code> otherwise</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>edge</code> is <code>null</code> or adjacent nodes not
 legal in the graph</dd></dl>
</li>
</ul>
<a name="isDirected(org.gephi.graph.api.Edge)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isDirected</h4>
<pre>boolean&nbsp;isDirected(<a href="../../../../org/gephi/graph/api/Edge.html" title="interface in org.gephi.graph.api">Edge</a>&nbsp;edge)</pre>
<div class="block">Returns <code>true</code> if <code>edge</code> is a directed edge in the current graph. Always
 returns <code>true</code> when the graph is <b>directed</b> and <code>false</code> when the graph
 is <b>undirected</b>. In case of a <b>mixed</b> graph returns </code>Edge.isDirected()</code>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>edge</code> - </dd>
<dt><span class="strong">Returns:</span></dt><dd><code>true</code> is <code>edge</code> is directed</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>edge</code> is <code>null</code> or adjacent nodes not
 legal in the graph</dd></dl>
</li>
</ul>
<a name="isAdjacent(org.gephi.graph.api.Node, org.gephi.graph.api.Node)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isAdjacent</h4>
<pre>boolean&nbsp;isAdjacent(<a href="../../../../org/gephi/graph/api/Node.html" title="interface in org.gephi.graph.api">Node</a>&nbsp;node1,
                 <a href="../../../../org/gephi/graph/api/Node.html" title="interface in org.gephi.graph.api">Node</a>&nbsp;node2)</pre>
<div class="block">Returns <code>true</code> if <code>node1</code> is adjacent to <code>node2</code>. Is adjacent
 when an edge exists between <code>node1</code> and <code>node2</code>.
 <p><b>Warning:</b> This method is not thread safe, be sure to call it in a locked
 statement.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>node1</code> - the first node to be queried</dd><dd><code>node2</code> - the seconde node to be queried</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>true</code> if <code>node1</code> is adjacent to <code>node2</code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>node1</code> or <code>node2</code> is <code>null</code> of
 not legal in the graph</dd></dl>
</li>
</ul>
<a name="isAdjacent(org.gephi.graph.api.Edge, org.gephi.graph.api.Edge)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isAdjacent</h4>
<pre>boolean&nbsp;isAdjacent(<a href="../../../../org/gephi/graph/api/Edge.html" title="interface in org.gephi.graph.api">Edge</a>&nbsp;edge1,
                 <a href="../../../../org/gephi/graph/api/Edge.html" title="interface in org.gephi.graph.api">Edge</a>&nbsp;edge2)</pre>
<div class="block">Returns <code>true</code> if <code>edge1</code> is adjacent to <code>edge2</code>. Is adjacent
 when an node is incident to both edges.
 <p><b>Warning:</b> This method is not thread safe, be sure to call it in a locked
 statement.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>edge1</code> - the first node to be queried</dd><dd><code>edge2</code> - the seconde node to be queried</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>true</code> if <code>edge1</code> is adjacent to <code>edge2</code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>edge1</code> or <code>edge2</code> is <code>null</code> of
 not legal in the graph</dd></dl>
</li>
</ul>
<a name="clearEdges(org.gephi.graph.api.Node)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clearEdges</h4>
<pre>void&nbsp;clearEdges(<a href="../../../../org/gephi/graph/api/Node.html" title="interface in org.gephi.graph.api">Node</a>&nbsp;node)</pre>
<div class="block">Removes all edges incident to <code>node</code>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>node</code> - the node whose edges is to be cleared</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>node</code> if null or not legal in the graph</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalMonitorStateException.html?is-external=true" title="class or interface in java.lang">IllegalMonitorStateException</a></code> - if the current thread is holding a read lock</dd></dl>
</li>
</ul>
<a name="clear()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clear</h4>
<pre>void&nbsp;clear()</pre>
<div class="block">Removes all nodes and edges in the graph.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalMonitorStateException.html?is-external=true" title="class or interface in java.lang">IllegalMonitorStateException</a></code> - if the current thread is holding a read lock</dd></dl>
</li>
</ul>
<a name="clearEdges()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clearEdges</h4>
<pre>void&nbsp;clearEdges()</pre>
<div class="block">Removes all edges in the graph.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalMonitorStateException.html?is-external=true" title="class or interface in java.lang">IllegalMonitorStateException</a></code> - if the current thread is holding a read lock</dd></dl>
</li>
</ul>
<a name="setId(org.gephi.graph.api.Node, java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setId</h4>
<pre>void&nbsp;setId(<a href="../../../../org/gephi/graph/api/Node.html" title="interface in org.gephi.graph.api">Node</a>&nbsp;node,
         <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;id)</pre>
<div class="block">Sets the string identifier of <code>node</code>. This identifier can be set
 by users, in contrario of <a href="../../../../org/gephi/graph/api/Node.html#getId()"><code>Node.getId()</code></a> which is set by the system.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>id</code> - the id that is to be set for <code>node</code></dd></dl>
</li>
</ul>
<a name="setId(org.gephi.graph.api.Edge, java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setId</h4>
<pre>void&nbsp;setId(<a href="../../../../org/gephi/graph/api/Edge.html" title="interface in org.gephi.graph.api">Edge</a>&nbsp;edge,
         <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;id)</pre>
<div class="block">Sets the string identifier of <code>edge</code>. This identifier can be set
 by users, in contrario of <a href="../../../../org/gephi/graph/api/Edge.html#getId()"><code>Edge.getId()</code></a> which is set by the system.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>id</code> - the id that is to be set for <code>edge</code></dd></dl>
</li>
</ul>
<a name="readLock()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readLock</h4>
<pre>void&nbsp;readLock()</pre>
<div class="block">Acquires a read lock on the graph. Calling thread will be blocked until all write locks are released.
 Several threads can read but only once can write.
 <p>
 A read lock can be acquired several times by a thread, but be sure to call <code>readUnlock()</code>
 the same number of time you called this method, or use <code>readUnlockAll()</code> to release all
 locks.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/locks/ReentrantReadWriteLock.html?is-external=true" title="class or interface in java.util.concurrent.locks"><code>ReentrantReadWriteLock</code></a></dd></dl>
</li>
</ul>
<a name="readUnlock()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readUnlock</h4>
<pre>void&nbsp;readUnlock()</pre>
<div class="block">Releases the read lock on the graph. Must be called from the same thread that locked the graph.
 <p>
 Use <code>readUnlockAll()</code> if you ignore the number of times the read lock has been acquired.</div>
</li>
</ul>
<a name="readUnlockAll()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readUnlockAll</h4>
<pre>void&nbsp;readUnlockAll()</pre>
<div class="block">Safe method that releases all read locks the calling thread has acquired. Use this method if you are
 cancelling a task and you don't know how many read locks have been acquired.</div>
</li>
</ul>
<a name="writeLock()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeLock</h4>
<pre>void&nbsp;writeLock()</pre>
<div class="block">Acquires a write lock on the graph. Calling thread will be blocked until all read locks are released.
 Several threads can read but only once can write.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalMonitorStateException.html?is-external=true" title="class or interface in java.lang">IllegalMonitorStateException</a></code> - if the current thread is holding a read lock</dd><dt><span class="strong">See Also:</span></dt><dd><a href="http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/locks/ReentrantReadWriteLock.html?is-external=true" title="class or interface in java.util.concurrent.locks"><code>ReentrantReadWriteLock</code></a></dd></dl>
</li>
</ul>
<a name="writeUnlock()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeUnlock</h4>
<pre>void&nbsp;writeUnlock()</pre>
<div class="block">Release the write lock on the graph. Must be called from the same thread that locked the graph.</div>
</li>
</ul>
<a name="getGraphModel()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getGraphModel</h4>
<pre><a href="../../../../org/gephi/graph/api/GraphModel.html" title="interface in org.gephi.graph.api">GraphModel</a>&nbsp;getGraphModel()</pre>
<div class="block">Returns the graph model this graph belongs to.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the graph model this graph belongs to.</dd></dl>
</li>
</ul>
<a name="getView()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getView</h4>
<pre><a href="../../../../org/gephi/graph/api/GraphView.html" title="interface in org.gephi.graph.api">GraphView</a>&nbsp;getView()</pre>
<div class="block">Returns the graph view this graph belongs to.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the graph view this graph belongs to.</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Graph.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/gephi/graph/api/EdgeIterator.html" title="interface in org.gephi.graph.api"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/gephi/graph/api/GraphController.html" title="interface in org.gephi.graph.api"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/gephi/graph/api/Graph.html" target="_top">Frames</a></li>
<li><a href="Graph.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2007-2012 <a href="http://consortium.gephi.org">Gephi Consortium</a>. All Rights Reserved.</small></p>
</body>
</html>
